package com.loyal.camerax.ui

import android.content.Intent
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel

class CameraViewModel : ViewModel() {
    private val _statusData = MutableLiveData<Int>()
    val status: LiveData<Int> = _statusData
    private val _broadcast = MutableLiveData<Intent?>()
    val broadcast: LiveData<Intent?> = _broadcast

    fun updateStatus(status: Int) {
        _statusData.postValue(status)
    }

    fun backToReceiver(intent: Intent?) {
        _broadcast.postValue(intent)
    }
}